package com.video.video.service.impl;

import java.util.List;
import com.video.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.video.video.mapper.DSystemSettingsMapper;
import com.video.video.domain.DSystemSettings;
import com.video.video.service.IDSystemSettingsService;

/**
 * 系统设置Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-27
 */
@Service
public class DSystemSettingsServiceImpl implements IDSystemSettingsService
{
    @Autowired
    private DSystemSettingsMapper dSystemSettingsMapper;

    /**
     * 查询系统设置
     *
     * @param id 系统设置主键
     * @return 系统设置
     */
    @Override
    public DSystemSettings selectDSystemSettingsById(String id)
    {
        return dSystemSettingsMapper.selectDSystemSettingsById(id);
    }

    /**
     * 查询系统设置列表
     *
     * @param dSystemSettings 系统设置
     * @return 系统设置
     */
    @Override
    public List<DSystemSettings> selectDSystemSettingsList(DSystemSettings dSystemSettings)
    {
        return dSystemSettingsMapper.selectDSystemSettingsList(dSystemSettings);
    }

    /**
     * 新增系统设置
     *
     * @param dSystemSettings 系统设置
     * @return 结果
     */
    @Override
    public int insertDSystemSettings(DSystemSettings dSystemSettings)
    {
        dSystemSettings.setCreateTime(DateUtils.getNowDate());
        return dSystemSettingsMapper.insertDSystemSettings(dSystemSettings);
    }

    /**
     * 修改系统设置
     *
     * @param dSystemSettings 系统设置
     * @return 结果
     */
    @Override
    public int updateDSystemSettings(DSystemSettings dSystemSettings)
    {
        dSystemSettings.setUpdateTime(DateUtils.getNowDate());
        return dSystemSettingsMapper.updateDSystemSettings(dSystemSettings);
    }

    /**
     * 批量删除系统设置
     *
     * @param ids 需要删除的系统设置主键
     * @return 结果
     */
    @Override
    public int deleteDSystemSettingsByIds(String[] ids)
    {
        return dSystemSettingsMapper.deleteDSystemSettingsByIds(ids);
    }

    /**
     * 删除系统设置信息
     *
     * @param id 系统设置主键
     * @return 结果
     */
    @Override
    public int deleteDSystemSettingsById(String id)
    {
        return dSystemSettingsMapper.deleteDSystemSettingsById(id);
    }
}
